
var Login = resolve => require(['./pages/Login.vue'], resolve)
var NotFound = resolve => require(['./pages/404.vue'], resolve)
var Home = resolve => require(['./pages/Home.vue'], resolve)
var Main = resolve => require(['./pages/Main.vue'], resolve)
var customerOrderList = require('./pages/Order/customerOrderList.vue')
var echarts = resolve => require(['./pages/charts/echarts.vue'], resolve)
var customerList = resolve => require(['./pages/Customer/CustomerList.vue'], resolve)
var test = resolve => require(['./pages/test/test.vue'], resolve)
var memberList = resolve => require(['./pages/member/memberList.vue'], resolve)
var roleList = resolve => require(['./pages/member/roleList.vue'], resolve)
var me = resolve => require(['./pages/member/me.vue'], resolve)
var companyList = resolve => require(['./pages/Company/companyList.vue'], resolve)
var myCompanyInfo = resolve => require(['./pages/Company/myCompanyInfo.vue'], resolve)
var flowList = resolve => require(['./pages/flow/flowList.vue'], resolve)
var taskList = resolve => require(['./pages/task/taskList.vue'], resolve)
var myTaskList = resolve => require(['./pages/task/myTaskList.vue'], resolve)
var contract = resolve => require(['./pages/contract/contractList.vue'], resolve)
var SettlementList = resolve => require(['./pages/Finance/SettlementList.vue'], resolve)
var view1 = require('./pages/view.vue')



exports.menus = function () {
    // body...
    return [

        {
            path: '/',
            component: Home,
            name: '工作',
            iconCls: 'fa fa-coffee',//图标样式class
            children: [
                {
                    path: '/view',
                    component: view1,
                    name: '我',
                    iconCls: 'fa fa-address-book-o',//图标样式class
                    children: [
                        {
                            path: '/me', component: me, name: '资料修改', hidden: false, id: "300100"

                        }

                    ],
                    id: "300"
                },
            ],
            id: "30"

        },


        {
            path: '/',
            component: Home,
            name: '客户',
            iconCls: 'fa fa-address-book-o',//图标样式class
            children: [
                {
                    path: '/view',
                    component: view1,
                    name: '客户',
                    iconCls: 'fa fa-address-book-o',//图标样式class
                    children: [
                        { path: '/customerList', component: customerList, name: '客户列表', hidden: false, id: "400100" }
                    ],
                    id: "400"
                },
            ],
            id: "40"

        },
        {
            path: '/',
            component: Home,
            name: '订单',
            iconCls: 'fa fa-id-card-o',//图标样式class
            children: [
                {
                    path: '/view',
                    component: view1,
                    name: '订单',
                    iconCls: 'fa fa-id-card-o',
                    children: [
                        { path: '/customerOrderList', component: customerOrderList, name: '订单列表', id: "500100" },
                        { path: '/contractList', component: contract, name: '合同列表', id: "500200" }

                    ],
                    id: "500"
                },
            ],
            id: "50"

        },


        {
            path: '/',
            component: Home,
            name: '任务',
            iconCls: 'fa fa-tasks',//图标样式class
            children: [
                {
                    path: '/',
                    component: view1,

                    name: '任务管理',
                    iconCls: 'fa fa-tasks',
                    children: [
                        { path: '/myTaskList', component: myTaskList, name: '我的任务列表', id: "900200" },
                        { path: '/taskList', component: taskList, name: '任务维护[管理]', id: "900100" }


                    ],
                    id: "900"
                },
                {
                    path: '/',
                    component: view1,


                    name: '流程管理',
                    iconCls: 'fa fa-gears',
                    children: [
                        { path: '/flowList', component: flowList, name: '流程列表', id: "800100" }

                    ],
                    id: "800"
                },

                {
                    path: '/',
                    component: view1,
                    name: '测试',
                    iconCls: 'fa fa-tasks',
                    children: [
                        { path: '/test', component: test, name: '测试', id: "900100" },


                    ],
                    id: "96600"
                },
            ],
            id: "80"

        },

        {
            path: '/',
            component: Home,
            name: '财务',
            iconCls: 'fa fa-money',//图标样式class
            children: [
                {
                    path: '/',
                    component: view1,

                    name: '财务',
                    iconCls: 'fa fa-money',
                    children: [
                        { path: '/SettlementList', component: SettlementList, name: '应收账款', id: "1000100" },


                    ],
                    id: "1000"
                }
            ],
            id: "100"

        },
        {
            path: '/',
            component: Home,
            name: '系统管理',
            iconCls: 'fa fa-gear',//图标样式class
            children: [
                {
                    path: '/member',
                    component: view1,
                    name: '员工管理',
                    iconCls: 'fa fa-user-circle-o',
                    children: [
                        { path: '/memberList', component: memberList, name: '员工列表', id: "600100" },
                        { path: '/roleList', component: roleList, name: '角色管理', id: "600200" }

                    ],
                    id: "600"
                },

                {
                    path: '/company',
                    component: view1,
                    name: '企业管理',
                    iconCls: 'fa fa-industry',
                    children: [
                        { path: '/myCompanyInfo', component: myCompanyInfo, name: '企业信息', id: "700200" },
                        { path: '/companyList', component: companyList, name: '企业列表(超管)', id: "700100" }

                    ],
                    id: "700"
                },
            ],
            id: "60"

        }

    ];
};

exports.routes2 = function () {
    // body...
    var m = this.menus()
    m.push({
        path: '*',
        hidden: true,
        redirect: { path: '/404' }

    })
    m.push({
        path: '/login',
        component: Login,
        name: '',
        hidden: true,
        id: "1000000000"

    })
    m.push({
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true,
        id: "200"

    })

    return m
};


